﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Simple.Common.Extensions;
using Simple.Repository.Models.Attendance;

namespace Simple.Services.System.Recipes.Models
{
    public class PlanDayRecipesViewModel
    {
        /// <summary>
        /// 每周计划食谱id
        /// </summary>
        public Guid? PlanWeekRecipesId { get; set; }

        /// <summary>
        /// 日期（：2023-01-01）
        /// </summary>
        public string Date { get; set; }

        /// <summary>
        /// 日期（：星期一）
        /// </summary>
        public string DateStr { get; set; }

        /// <summary>
        /// 就餐人数
        /// </summary>
        public int Number { get; set; }

        /// <summary>
        /// 菜谱
        /// </summary>
        public List<PlanDayRecipesDetailViewModel> PlanDayRecipesDetails { get; set; }

        /// <summary>
        /// 当日营养分析
        /// </summary>
        public NutritionalAnalysisDto NutritionalAnalysisDto { get; set; }

    }

    public class PlanDayRecipesDetailViewModel
    {
        /// <summary>
        /// 类型
        /// </summary>
        public EnumRecipes Type { get; set; }

        /// <summary>
        /// 食谱
        /// </summary>
        public List<RecipesViewModel> RecipesList { get; set; }
    }
    public class RecipesViewModel
    {

        public Guid RecipesId { get; set; }

        /// <summary>
        /// 食谱名称
        /// </summary>
        public string RecipesName { get; set; }

        public List<RecipesDetailsViewModel>? RecipesDetailsList { get; set; }
    }
    public class RecipesDetailsViewModel
    {

        /// <summary>
        /// 食物重量
        /// </summary>
        public decimal Weight { get; set; }

        /// <summary>
        /// 食物名称
        /// </summary>
        public string FoodName { get; set; }
    }


    public class WeekQuantityRequiredViewModel
    {

        /// <summary>
        /// 每周计划食谱id
        /// </summary>
        public Guid? PlanWeekRecipesId { get; set; }

        /// <summary>
        /// 食谱周期
        /// </summary>
        public string PlanRange { get; set; }

        public List<FoodList> FoodLists { get; set; }

    }

    public class FoodList
    {
        /// <summary>
        /// 食物名称
        /// </summary>
        public string FoodName { get; set; }

        /// <summary>
        /// 每日需求量
        /// </summary>
        public List<DayQuantityRequiredViewModel> DayQuantityRequiredList { get; set; }

        /// <summary>
        /// 合计
        /// </summary>
        public decimal TotalQuantity { get; set; }
    }

    public class DayQuantityRequiredViewModel
    {
        /// <summary>
        /// 日期（：2023-01-01）
        /// </summary>
        public string Date { get; set; }

        /// <summary>
        /// 日期（：星期一）
        /// </summary>
        public string DateStr { get; set; }

        /// <summary>
        /// 需求量（斤）
        /// </summary>
        public decimal QuantityRequired { get; set; }

        /// <summary>
        /// 就餐人数
        /// </summary>
        public int Number { get; set; }
    }



    public class WeekQuantityRequiredViewModelV2
    {
        /// <summary>
        /// 食谱周期
        /// </summary>
        public string PlanRange { get; set; }

        public string[] PlanRangeArr { get; set; }

        public List<FoodListV2> FoodLists { get; set; }

    }

    public class FoodListV2
    {
        /// <summary>
        /// 食物名称
        /// </summary>
        public string FoodName { get; set; }

        /// <summary>
        /// 周一
        /// </summary>
        public decimal Monday { get; set; }

        /// <summary>
        /// 周二
        /// </summary>
        public decimal Tuesday { get; set; }

        /// <summary>
        /// 周三
        /// </summary>
        public decimal Wednesday { get; set; }

        /// <summary>
        /// 周四
        /// </summary>
        public decimal Thursday { get; set; }

        /// <summary>
        /// 周五
        /// </summary>
        public decimal Friday { get; set; }

        /// <summary>
        /// 周六
        /// </summary>
        public decimal Saturday { get; set; }

        /// <summary>
        /// 周日
        /// </summary>
        public decimal Sunday { get; set; }

        /// <summary>
        /// 合计
        /// </summary>
        public decimal TotalQuantity { get; set; }
    }



}
